package com.eduplatform.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.eduplatform.entity.User;

public interface UserService extends IService<User> {

    /**
     * Login with username and password
     * 
     * @param username username
     * @param password password
     * @return JWT token if login successful, null otherwise
     */
    String login(String username, String password);

    /**
     * Register a new user
     * 
     * @param user user info
     * @return true if registration successful, false otherwise
     */
    boolean register(User user);

    /**
     * Get user by username
     * 
     * @param username username
     * @return user info
     */
    User getUserByUsername(String username);

    /**
     * Logout user
     * 
     * @param token JWT token
     * @return true if logout successful, false otherwise
     */
    boolean logout(String token);
}